package com.advertising.controls;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.advertising.biz.IFeedbackService;
import com.advertising.model.Feedback;
import com.tgyt.framework.controls.struts2.BaseTg;
@Scope("prototype")
@Controller(value="feedbackTgControl")
public class FeedbackTg extends BaseTg {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Resource(name="feedbackService")
	private IFeedbackService feedbackService;
	private Feedback feedback;
 
	/** 
	  * @Title: save 
	  * @Description: 保存一条记录
	  * @param 
	  * @return void
	  * @throws 
	  */
	public void aboutAD(){
		try {
		 
			this.feedbackService.save(feedback);
			outJsonPlainString(response, "{\"success\":true}");
		} catch (Exception e) {
			e.printStackTrace();
			outJsonPlainString(response, "{\"error\":true}");
		} 
	}
//////////////////set get//////////////////////////////

	public Feedback getFeedback() {
		return feedback;
	}

	public void setFeedback(Feedback feedback) {
		this.feedback = feedback;
	}
	
	
	
	
}
